Revision: PlacelessTranslationService--main--1.0--patch-41
Archive: lalo@exoweb.net--2005
Creator: Lalo Martins <lalo@exoweb.net>
Date: Sun Feb 20 20:19:21 HKT 2005
Standard-date: 2005-02-20 12:19:21 GMT
Modified-files: __init__.py
New-patches: lalo@exoweb.net--2005/PlacelessTranslationService--main--1.0--patch-41
Summary: ok, this one is hard to explain :-)
CSCVSID: MAIN.41
Keywords: cscvs:MAIN.41

Author: lalo
Date: 2003-08-05 15:53:15 HKT
ok, this one is hard to explain :-)

a reference to the PTS instance is stored as a module global here and in
PageTemplates.GlobalTranslationService.  But since this is a persistent
object, what we actually store is a wrapper with the OID and a reference
to the connection object.

Problem is, calling Zope.app() creates a new connection - not the same one
used by ZPublisher.  Since caches are per-connection, this means when you
update the translation service via ZMI, your changes wouldn't be reflected
in the global reference until the next restart.

This change makes it instead store a wrapper that uses the same connection
as the Publisher, therefore caching properly.

(whoa... explanation 15 times the size of the change ;-))
